10 minutos atrás, Taiger disse:ah ok, obrigado, e aquela tabela de catch? O arquivo é o da lib? teria como explicar para adiciona essa tabela?
aquelas tabelas servem para fazer um sistema de caught por persistencia igual da pxg, é muito simples, bota elas no configuration, depois no catchsystem na função de não capturar poke, você pode botar a seguinte tabela com algumas checagems
local csysrate = {["normal"] = {csys = 10, csysh = 5, csyss = 2},["great"] = {csys = 30, csysh = 15, csyss = 6},["super"] = {csys = 55, csysh = 27, csyss = 11},["ultra"] = {csys = 90, csysh = 45, csyss = 18},["safari"] = {csys = 40, csysh = 20, csyss = 8} --no meu server acabei deixando a saffari com 1 f enquanto corrigia um bug altere se preciso}if catchsystemall[poke] thenif catchsystemall[poke].ratetype == "normal" thenlocal arroz = getPlayerStorageValue(cid, catchsystem[poke].storage)local feijao = csysrate[typeee].csysif (arroz/10) < (pokecatches[poke].chance)-10 thensetPlayerStorageValue(cid, catchsystem[poke].storage, arroz + feijao)endendif catchsystemall[poke].ratetype == "hard" thenlocal arrozh = getPlayerStorageValue(cid, catchsystemhard[poke].storage)local feijaoh = csysrate[typeee].csyshif (arrozh/10) < (pokecatches[poke].chance)-10 thensetPlayerStorageValue(cid, catchsystemhard[poke].storage, arrozh + feijaoh)endendif catchsystemall[poke].ratetype == "shiny" thenlocal arrozs = getPlayerStorageValue(cid, catchsystemshiny[poke].storage)local feijaos = csysrate[typeee].csyssif (arrozs/10) < (pokecatches[poke].chance)-10 thensetPlayerStorageValue(cid, catchsystemshiny[poke].storage, arrozs + feijaos)endendend
csys para normal, csysh para hard e csyss para shiny, no meu caso eu botei 10x o que eu quero que aumente porque o storage não aceita numeros com "," tipo 1,8 ou 0,2, depois quando capturar o poke você bota pra zerar o storage algo como:
if catchsystemall[poke] thenif catchsystemall[poke].ratetype == "normal" thensetPlayerStorageValue(cid, catchsystem[poke].storage,0)endif catchsystemall[poke].ratetype == "hard" thensetPlayerStorageValue(cid, catchsystemhard[poke].storage,0)endif catchsystemall[poke].ratetype == "shiny" thensetPlayerStorageValue(cid, catchsystemshiny[poke].storage,0)endend
por ultimo só fazer calcular o storage/10 com a chance quando for catar o poke.












info
Group: Marquês
Joined: 02/07/07
Posts: 1.1k
Reputation: +287
Gender: Masculino
ah ok, obrigado, e aquela tabela de catch? O arquivo é o da lib? teria como explicar para adiciona essa tabela?
Edited Junho 20 by Taiger